import 'package:flutter_test/flutter_test.dart';
import 'package:native_video_play/native_video_play.dart';
import 'package:native_video_play/native_video_play_platform_interface.dart';
import 'package:native_video_play/native_video_play_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockNativeVideoPlayPlatform
    with MockPlatformInterfaceMixin
    implements NativeVideoPlayPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final NativeVideoPlayPlatform initialPlatform = NativeVideoPlayPlatform.instance;

  test('$MethodChannelNativeVideoPlay is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelNativeVideoPlay>());
  });

  test('getPlatformVersion', () async {
    NativeVideoPlay nativeVideoPlayPlugin = NativeVideoPlay();
    MockNativeVideoPlayPlatform fakePlatform = MockNativeVideoPlayPlatform();
    NativeVideoPlayPlatform.instance = fakePlatform;

    expect(await nativeVideoPlayPlugin.getPlatformVersion(), '42');
  });
}
